export default defineEventHandler(async (event) => {
  const data = await readBody(event)
  for (let { id, sort } of data) {
    await useTable(TABLE.MAIN).where({ id }).update({ sort })
  }
  const { key } = event.context
  useWsSyncData(key)
  return resSuccess()
})
